<?php
/**
 * @content: 解析参数
 * @author: xuch
 */
class Parse {
	private $_trace = NULL;
	private $_request = array();
	
	public function __construct () {
		$this->_trace = Trace::create();
		$this->_trace->push(__CLASS__);
		$this->_request = $_SERVER;
		//var_dump($this->_request);
	}
	public function getPath () {
		if (!empty($this->_request) && is_array($this->_request)) {
			//$path = $this->_request['REQUEST_URI'];
			$path = explode('/', $this->_request['REQUEST_URI']);
			if (count($path) > 1) {
				if (count(explode($path[1])) > 1) {
					array_shift($path);
					array_shift($path);
					return $path;
				}
			}
			
		}
	}
}